Graphics.DrawString Method

Draws the text at the specified location. The Y parameter specifies the baseline for the text.

Syntax

Graphics.DrawString Text, X, Y, [WrapWidth], [Condense]

Parameters

Text

String

X

Integer

Y

Integer

WrapWidth

Integer (Optional)

Condense

Boolean (Optional)

Notes

The optional WrapWidth parameter specifies the width (in pixels) at which text should wrap. If the optional Condense property is True, DrawString tries to kern the string to fit into the space specified by WrapWidth. If it can't fit it in, it will use an ellipsis ("...") to indicate that there is additional text that is not shown. The default values of WrapWidth and Condense are zero and False, respectively.